1. Field of the Invention
The present invention relates to a storage device and is suitably applied to a semiconductor storage device configured to receive data transmitted from an information processing device such as a personal computer and store the data in an internal semiconductor memory (flash memory, etc.).
2. Description of the Related Art
As a semiconductor storage device of such a type, card type semiconductor storage devices have become popular in recent years. Among them, a memory stick® and the like are widely known.
When such a semiconductor storage device receives data (hereinafter, referred to as “actual data”, for the sake of convenience) to be stored in an internal flash memory from an information processing device corresponding to a personal computer, it firstly generates parity data for error detection/correction processing corresponding to the received actual data. Then the actual data and generated parity data are associated with each other and stored in the flash memory.
When reading out the actual data stored in the internal flash memory, the semiconductor storage device reads out the parity data corresponding to the actual data together with the actual data and performs error detection/correction processing for the actual data based on the read out parity data. In the error detection/correction processing, the semiconductor storage device detects whether there occurs an error in the actual data based on the read out parity data. When detecting that there occurs no error in the actual data, the semiconductor storage device outputs the actual data to an external device without change. On the other hand, when detecting that there occurs any error in the actual data, it corrects the error of the actual data based on the parity data and outputs the corrected actual data to an external device.
As described above, the semiconductor storage device is configured to ensure accuracy of the actual data stored in the flash memory (refer to, for example, Jpn. Pat. Appln. Laid-Open Publication No. 2004-164634).